

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger, TKIMSettingItemType) {
    TKIMSettingItemTypeDefault,       // image, title, rightTitle, rightImage
    TKIMSettingItemTypeDefaultL,      // image, title, leftImage, rightTitle
    TKIMSettingItemTypeLeft,          // image, title, leftTitle, leftImage
    TKIMSettingItemTypeButton,        // button
    TKIMSettingItemTypeAvatar,        // title, avatar
    TKIMSettingItemTypeMidTitle,      // title
    TKIMSettingItemTypeSwitch,        // title， Switch
};


@interface TKIMSettingItem : NSObject

@property (nonatomic, assign) TKIMSettingItemType type;
@property (nonatomic, strong) NSString *imageName;
@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong) NSString *subTitle;
@property (nonatomic, strong) NSObject *subImage;
@property (nonatomic, strong) NSMutableArray *subImages;
@property (nonatomic, strong) NSURL *subImageURL;
@property (nonatomic, strong) NSString * cssClass;

- (id) initWithTitle:(NSString *)title;
- (id) initWithTitle:(NSString *)title subImage:(NSObject *)subImage;
- (id) initWithTitle:(NSString *)title subImages:(NSMutableArray *)subImages;
- (id) initWithTitle:(NSString *)title type:(TKIMSettingItemType)type;
- (id) initWithTitle:(NSString *)title imageName:(NSString *)imageName;
- (id) initWithTitle:(NSString *)title subTitle:(NSString *)subTitle;
- (id) initWithTitle:(NSString *)title subTitle:(NSString *)subTitle type:(TKIMSettingItemType)type;
- (id) initWithTitle:(NSString *)title subImage:(NSObject *)subImage type:(TKIMSettingItemType)type;

- (id) initWithTitle:(NSString *)title subTitle:(NSString *)subTitle imageName:(NSString *)imageName subImage:(NSObject *)subImage;
- (id) initWithTitle:(NSString *)title subTitle:(NSString *)subTitle imageName:(NSString *)imageName subImage:(NSObject *)subImage type:(TKIMSettingItemType)type;
- (id) initWithTitle:(NSString *)title subTitle:(NSString *)subTitle imageName:(NSString *)imageName subImageURL:(NSURL *)subImageURL type:(TKIMSettingItemType)type;

- (id) initWithTitle:(NSString *)title cssClass:(NSString *)cssClass;
@end

@interface TKIMSettingGroup : NSObject

@property (nonatomic, strong) NSString *headerTitle;
@property (nonatomic, strong) NSString *footerTitle;
@property (nonatomic, strong) NSMutableArray *items;
@property (nonatomic, assign) NSUInteger itemsCount;

- (id) initWithHeaderTitle:(NSString *)headerTitle footerTitle:(NSString *)footerTitle settingItems:(TKIMSettingItem *)firstObj, ...;

- (TKIMSettingItem *) itemAtIndex:(NSUInteger)index;

@end

